<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script src="./promise3-静态方法.js"></script>
    <script>
        // Promise.resolve('333')
        // // Promise.resolve(new Promise((resolve, reject) => {
        // //     // reject(444);
        // //     resolve(555)
        // // }))
        // // Promise.reject('aaaa')
        // .then(
        //     value => {console.log('Fulfilled---', value);},
        //     reason => {console.log('Rejected---', reason);}
        // )
        let p1 = Promise.resolve('111');
        let p2 = Promise.reject('222');
        let p3 = Promise.resolve('333');
        // Promise.all([p1,p2])
        Promise.allSettled([p1, p2, p3])
        .then(
            value => {console.log('Fulfilled---', value);},
            reason => {console.log('Rejected---', reason);}
        )
    </script>
</body>
</html>